import request from '@/utils/request'
// 查询部门列表
export function listcargo(pageNum, pageSize) {
  return request({
    url: '/farmes/cargo/list?pageNum=' + pageNum + '&pageSize=' + pageSize ,
    method: 'post',
  })
}
//零售列表
export function retailList(pageNum, pageSize, formins) {
  return request({
    url: '/farmes/retail/list?pageNum=' + pageNum + '&pageSize=' + pageSize ,
    method: 'post',
    data: formins
  })
}
//零售添加
export function save(form) {
  return request({
    url: '/farmes/retail/add',
    method: 'post',
    data: form
  })
}//零售修改
export function toupdate(user) {
  return request({
    url: '/farmes/retail/update',
    method: 'post',
    data: user
  })

}


export function gettype1() {
  return request({
    url: '/farmes/cargo/gettype',
    method: 'get',
  })
}


export function getadd(form) {
  return request({
    url: '/farmes/cargo/Cargoadd',
    method: 'post',
    data: form
  })
}


export function deteletCargo(id) {
  return request({
    url: '/farmes/cargo/deleteById?id='+id,
    method: 'get',

  })
}




export function listProcess(formInline,pageNum,pageSize){
  return request({
    url: '/farmes/process/list?pageNum='+pageNum+'&pageSize='+pageSize,
    method: 'post',
    data: formInline
  })

}
export function delList(processId){
  return request({
    url: '/farmes/process/delById?processId='+processId,
    method: 'post',
  })

}
export function getList(){
  return request({
    url: '/farmes/process/getList',
    method: 'get',
  })

}
export function getExcel(){
  return request({
    url: '/farmes/process/download',
    method: 'get',
  })

}
export function getCrop(){
  return request({
    url: '/farmes/process/getCrop',
    method: 'get',
  })

}
export function getCargo(){
  return request({
    url: '/farmes/process/getCargo',
    method: 'get',
  })

}
export function getRetail(){
  return request({
    url: '/farmes/process/getRetail',
    method: 'get',
  })

}
export function getSearch(processId){
  return request({
    url: '/farmes/process/search?processId='+processId,
    method: 'get',
  })

}
export function addProcess(form){
  return request({
    url: '/farmes/process/saveOrUpdate',
    method: 'post',
    data: form
  })

}
export function gettype(){
  return request({
    url: '/farmes/process/gettype',
    method: 'get',
  })

}


//查询农作物列表
export function listCrop(current,size,formInline) {
  return request({
    url: '/farmes/crop/list?current=' + current + '&size=' + size ,
    method: 'post',
    data:formInline
  })
}
export function plantation(){
  return request({
    url: '/farmes/crop/plantation',
    method: 'get',
  })
}
export function user(){
  return request({
    url: '/farmes/crop/user',
    method: 'get',
  })
}
export function plantingMethod(){
  return request({
    url: '/farmes/crop/plantingMethod',
    method: 'get',
  })
}
export function add(form){
  return request({
    url: '/farmes/crop/add',
    method: 'post',
    data: form
  })
}

// 查询部门详细
export function getTree() {
  return request({
    url: '/farmes/retail/getTree',
    method: 'get'
  })
}

export function listfactory(pageNum, pageSize,formInline) {
  return request({
    url: '/farmes/factory/factoryList?pageNum=' + pageNum + '&pageSize=' + pageSize,
    method: 'post',
    data: formInline,
  })
}


export function cityList() {
  return request({
    url: '/farmes/factory/cityList',
    method: 'get',
  })
}

export function cropList() {
  return request({
    url: '/farmes/factory/cropList',
    method: 'get',
  })
}

export function addFactory(form) {
  return request({
    url: '/farmes/factory/factoryAdd',
    method: 'post',
    data: form,
  })
}

export function getSelect(factoryId) {
  return request({
    url: '/farmes/factory/getSelect?factoryId='+factoryId,
    method: 'get',
  })
}

export function factoryDelete(factoryId) {
  return request({
    url: '/farmes/factory/factoryDelete',
    method: 'post',
    data:factoryId,
  })
}

export function listLogistics(pageNum, pageSize) {
  return request({
    url: '/farmes/logistics/logisticsList?pageNum=' + pageNum + '&pageSize=' + pageSize,
    method: 'post',
  })
}


















